<template>
	<view class="bg-white">
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="content">详情</block>
			<block slot="right">
				<button class="cu-btn bg-red shadow" @click="urging">催办</button>
			</block>
		</cu-custom>
		<view style="position: relative;" class="padding bg-white">
			<view class="text-cut padding" style="background-color: #F3F5FC ;color: #4591FE;border-radius: 15px;">
				创建日期：<text style="padding-left: 30px;">{{createTime}}</text>
				<text class="jinxingzhong">进行中</text>
			</view>

		</view>

		<view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					关联员工合同
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.workers}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
				申请人
				</view>
				<view class="flex-sub padding-sm margin-xs radius" style="color:#3085FE">
					{{dataObj.identityCategory}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					入职时间
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.retreatApplication}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					试用期时长
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.room}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					公司
				</view>
				<view class="company flex-sub padding-sm margin-xs radius">
					<image class="icon" src="../../../static/transfer/corporation1.png">
					</image>
					<text>
						{{dataObj.name}}
					</text>
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					部门
				</view>
				<view class="company flex-sub padding-sm margin-xs radius">
					<image class="icon"  src="../../../static/transfer/corporation1.png">
					</image>
					<text>
						{{dataObj.workNumber}}
					</text>
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					职务
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.company}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					转正日期
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.department}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					试用工资
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.departmentCategory}}
				</view>
			</view>
			<view class="flex">
				<view class=" padding-sm margin-xs radius left">
					人员单选
				</view>
				<view class="flex-sub padding-sm margin-xs radius">
					{{dataObj.workNumber}}
				</view>
			</view>
		</view>
		<view style="padding: 15px;">
			<view>
				<text style="color: #000000;font-weight: bold;font-size: 32rpx;">
					审批记录
				</text>
			</view>
			<view style="background-color: #f4f4f4;border-radius: 10px;margin-top: 10px;">
				<view class="cu-timeline" v-for="(item,index) in approvalRecords">
					<view class="cu-item text-green cuIcon-roundcheckfill">
						<view style="display: flex;color: #000000;">
							<view style="width: 45px;">
								<text
									style="margin-left: -18px;margin-top: 5px;display: block;font-weight: bold;">{{item.title}}</text>
							</view>
							<view style="margin-left: 20px;margin-top: 5px;">
								<view>
									<text style="font-size: 28rpx;">{{item.name}}</text>
								</view>
							</view>

						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import moment from 'moment';
	export default {
		data() {
			return {
				createTime: '2023.10.10',
				dataObj: {
					workers: '空',
					identityCategory: 'BQF119020-刘晓燕',
					retreatApplication: '2022/09/28',
					room: '1个月',
					name: '福建华源纺织',
					workNumber: '前纺BQF',
					company: '生产部/生产线/前纺AQF/二纺/A班',
					department: '2022/11/01',
					departmentCategory: '4500'
				},
				approvalRecords: [{
					title: '结束',
					name: '2022/10/10 12:00'
				}, {
					title: '填写单子',
					name: '成功'
				}],
				checkbox: [{
					value: 'A',
					checked: true
				}, {
					value: 'B',
					checked: true
				}, {
					value: 'C',
					checked: false
				}],
			}
		},
		mounted() {

		},
		computed: {

		},
		methods: {
			searchBtn() {
				console.log(this.searchValue)
			},
			urging(id) {
				const params = {
					applicationId: id,
					approvalType: 1
				}
				this.$http.get("/crm_on_hand/crmOnHand/urge",{params:params})
					.then(res => {
						if (res.data.success) {
							this.$refs.urgingPopup.open('center')
						}
					})
			},
		}
	}
</script>


<style lang="scss" scoped>

	image {
		width: 100%;
		height: 100%;
	}
	.icon{
		height: 40rpx;
		width: 40rpx;
		margin-right: 20rpx	;
	}
	.company{
		display: flex;
	}

	.blackList {
		height: 100%;
		overflow: hidden;
	}

	.page-search {
		padding-left: 34rpx;
		margin-bottom: 12rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.search {
		width: 680rpx;
		height: 86rpx;
		background-color: rgba(249, 249, 249, 1);
		border-radius: 60rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding-left: 24rpx;
		padding-right: 24rpx;

		.search-left {
			width: 28rpx;
			height: 28rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.search-center {
			margin-left: 22rpx;
		}

		.search-placeholder {
			font-size: 28rpx;
			font-weight: 400;
			color: #7C7C7C;
		}


	}

	.filter-btn {
		width: 40rpx;
		height: 40rpx;
		margin-right: 42rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.page-content-main {
		height: calc(100% - 12rpx - 86rpx);
		border-top-left-radius: 64rpx;
		border-top-right-radius: 64rpx;
		padding: 26rpx 34rpx 0 34rpx
	}

	.select-box {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;

	}

.select {
		width: 160rpx;
		height: 74rpx;
		border-radius: 60rpx;
		background-color: #4591FE;
		margin-bottom: 20rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
		margin-right: 48rpx;
		position: relative;

    .select-value {
      font-size: 28rpx;
      font-weight: 400;
      color: #FFFFFF;
      margin-right: 18rpx;
    }

    .select-icon {
      width: 22rpx;
      height: 22rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      position: absolute;
      right: 20rpx;
      top:25rpx;
    }
	}

	.list {
		height: calc(100% - 74rpx - 20rpx);
	}

	.list-item {
		border-radius: 28rpx;
		background-color: #FFFFFF;
		padding: 26rpx 24rpx 28rpx 20rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-bottom: 26rpx;
		position: relative;

		.list-item-leftCenter {
			display: flex;
			flex-direction: row;
		}

		.list-item-left {
			width: 86rpx;
			height: 86rpx;
			margin-right: 26rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.list-item-center {
			.list-item-row {
				display: flex;
				flex-direction: row;
				margin-bottom: 20rpx;

				.list-item-name {
					color: #101317;
					font-size: 32rpx;
					margin-right: 16rpx;
				}

				.list-item-sex {
					width: 106rpx;
					height: 42rpx;
					border-top-right-radius: 40rpx;
					border-bottom-right-radius: 40rpx;
					border-bottom-left-radius: 20rpx;
					background-color: rgba(234, 171, 78, 0.35);
					line-height: 42rpx;
					text-align: center;
					color: rgba(255, 173, 4, 1);
					font-size: 24rpx;
				}

				.list-item-row-icon {
					width: 38rpx;
					height: 38rpx;
					margin-right: 10rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.list-item-row-title,
				.list-item-row-value {
					font-size: 24rpx;
					font-weight: 400;
					color: #101317;
					line-height: 38rpx;
				}

			}
		}

		.list-item-btn {
			width: 36rpx;
			height: 36rpx;
			margin-top: 56rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.list-item-tab {
			width: 132rpx;
			height: 56rpx;
			text-align: center;
			line-height: 56rpx;
			background-color: rgba(69, 145, 254, 0.4);
			position: absolute;
			top: 0;
			right: 0;
			border-top-right-radius: 26rpx;
			border-bottom-left-radius: 20rpx;
		}

		.list-item-tab-text {
			font-size: 26rpx;
			color: rgba(69, 145, 254, 1)
		}
	}

	.nav-right-image {
		width: 80rpx;
		height: 80rpx;
		margin-left: 15px;
	}

	.cu-form-group {
		background-color: transparent;
	}

	::v-deep {
		.cu-form-group uni-picker .picker {
			color: #FFFFFF;
		}

		.cu-form-group uni-picker::after {
			opacity: 0;
		}
	}

	.textView {
		margin-left: 25px;
		font-size: 10px;
		margin-top: 5px;
	}

	.listText {
		width: 148rpx;
		height: 24rpx;
		font-size: 20rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		color: #000000;
		line-height: 24rpx;
	}

	th {
		border: 1px solid #000000;
		border-collapse: collapse;
		text-align: center;
		max-width: 50px;
		min-width: 44px;
		overflow: auto;
		/* 隐藏超出容器的文字 */
		white-space: nowrap;
		/* 禁止换行 */
		text-overflow: ellipsis;
	}

	td {
		border: 1px solid #000000;
		border-collapse: collapse;
		padding: 1px 15px;
		text-align: center;
		max-width: 44px;
		min-width: 44px;
		overflow: hidden;
		/* 隐藏超出容器的文字 */
		white-space: nowrap;
		/* 禁止换行 */
		text-overflow: ellipsis;
		word-wrap: break-word;

	}
	.text-cut{
		position: relative;
	}
	.jinxingzhong{
		font-size: 24rpx;
		position: absolute;
		right: 0;
		background-color: #3085FE;
		top:0;
		color: white;
		padding: 10rpx 20rpx;
		border-radius: 0rpx   30rpx   0rpx   30rpx  ;
	}
	.left{
		width: 30% !important;
	}
</style>
